package com.wwz.frame.event;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @Description 事件监听 实现方式一
 * @Author wwz
 * @Date 2019/08/26
 * @Param
 * @Return
 */
@Component
@Slf4j
public class SaveEventListener {
    @EventListener
    @Async
    public void saveLog(SaveEvent saveEvent) throws InterruptedException {
        log.info("SaveEventListener" + saveEvent.getObject());
    }
}
